Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

core/common/src/commonMain/kotlin/org/meshtastic/core/common/util/Coroutines.kt 2d20cd8a4708e2ef66e98d5259f3a97ec93f240a (2d20cd8a) Text, 1.76 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.common.util

Tff7b72import T7ee787kotlinx.coroutines.CoroutineExceptionHandler
Tff7b72import T7ee787kotlinx.coroutines.CoroutineScope
Tff7b72import T7ee787kotlinx.coroutines.CoroutineStart
Tff7b72import T7ee787kotlinx.coroutines.Job
Tff7b72import T7ee787kotlinx.coroutines.launch
Tff7b72import T7ee787kotlin.coroutines.CoroutineContext
Tff7b72import T7ee787kotlin.coroutines.EmptyCoroutineContext

Tff7b72private Tff7b72val Te6edf3errorHandler Tff7b72= Te6edf3CoroutineExceptionHandler Tb4b4b4{ Te6edf3_Tb4b4b4, Te6edf3exception Tff7b72-Tff7b72>
Te6edf3ExceptionsTb4b4b4.Te6edf3reportTb4b4b4(Te6edf3exceptionTb4b4b4, Ta5d6ff"Ta5d6ffcoroutine-exception-handlerTa5d6ff"Tb4b4b4, Ta5d6ff"Ta5d6ffUncaught coroutine exceptionTa5d6ff"Tb4b4b4)
Tb4b4b4}

T8b949e/**
* Launches a new coroutine with a central [CoroutineExceptionHandler] that reports errors to [Exceptions].
*
* @param context Additional to [CoroutineExceptionHandler] context.
* @param start Coroutine start option.
* @param block The coroutine code block.
* @return The launched [Job].
*/
Tff7b72fun Te6edf3CoroutineScopeTb4b4b4.Td2a8ffhandledLaunchTb4b4b4(
Te6edf3contextTb4b4b4: Te6edf3CoroutineContext Tff7b72= Te6edf3EmptyCoroutineContextTb4b4b4,
Te6edf3startTb4b4b4: Te6edf3CoroutineStart Tff7b72= Te6edf3CoroutineStartTb4b4b4.Te6edf3DEFAULTTb4b4b4,
Te6edf3blockTb4b4b4: Te6edf3suspend Te6edf3CoroutineScopeTb4b4b4.Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4,
Tb4b4b4)Tb4b4b4: Te6edf3Job Tff7b72= Te6edf3launchTb4b4b4(Te6edf3context Tff7b72= Te6edf3context Tff7b72+ Te6edf3errorHandlerTb4b4b4, Te6edf3start Tff7b72= Te6edf3startTb4b4b4, Te6edf3block Tff7b72= Te6edf3blockTb4b4b4)

Served by rngit 1.5.0 - Generated in 0.04s